Listing 05 - Page 0: No Title

##############################################################################
# Python From Scratch
# Autor: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2024
# Site: https://pythonfromscratch.com
#
# File: listing\chapter 05\05.1094 - No Title.py
# Description: No Title
##############################################################################

s = 0
while True:
    v = int(input("Enter a number to add or 0 to exit:"))
    if v == 0:
        break
    s += v
print(s)
Click here to download the file